Skip to content

Conversation

@rainersigwald
Copy link
Member

@rainersigwald rainersigwald commented Sep 6, 2019

Description

Fix #4695, build failures that arise when a .resx file does not specify DependentUpon and is in a subfolder.

Customer Impact

Builds fail with MSB3041. Impacts EF migrations (dotnet/ef6#1225), some WinForms projects, and some plain-vanilla projects.

Workaround

Users can explicitly opt out of the new behavior back into preview8 behavior with a property

<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>

Or explicitly specify DependentUpon for all resources:

<ItemGroup>
  <EmbeddedResource Update="Migrations\*.resx">
    <DependentUpon>%(FileName).cs</DependentUpon>
  </EmbeddedResource>
</ItemGroup>

Regression?

Yes, builds fail in cases that passed before. Introduced with #4597, a new feature to support resources without project-file impact.

Testing

Automated tests, including a new one for this specific case. e2e validation in failing scenarios using privates.

Risk

Low. Targeted fix in a conditioned codepath, so the existing workarounds will continue to work and can mitigate any problems.

@rainersigwald rainersigwald added Area: Tasks Issues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll. ask-mode labels Sep 6, 2019
@rainersigwald rainersigwald added this to the MSBuild 16.3 milestone Sep 6, 2019
@rainersigwald rainersigwald added the Approved to merge Approved by .NET Tactics for servicing or QB mode checkins label Sep 6, 2019
@rainersigwald rainersigwald merged commit ee8294b into dotnet:vs16.3 Sep 6, 2019
rainersigwald added a commit to rainersigwald/core that referenced this pull request Sep 25, 2019
vivmishra pushed a commit to dotnet/core that referenced this pull request Sep 30, 2019
* Remove resx-in-subfolder known issue

This was resolved before RTW by dotnet/msbuild#4702.

* Mark preview issue as resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved to merge Approved by .NET Tactics for servicing or QB mode checkins Area: Tasks Issues impacting the tasks shipped in Microsoft.Build.Tasks.Core.dll.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants